#pragma once
#ifndef CONSTANTS_H_
#define CONSTANTS_H_

#include <map>
// namespace constants
namespace constants
{
    // physical constants
    const double Avogadro = 6.022140857e23; // unit: 1/mol, SI
    const double Boltzmann = 1.38064852e-23; // unit: J/K, SI
    const double Bohr = 0.52917721067e-10;  // unit: m
    const double Pi = 3.14159265358979323;  // mathematical constant, dimensionless

    // Conversion factors between atomic units (AU) and standard international units (SI)
    const double Unit_au2fs = 2.4188843265857e-2;       // time
    const double Unit_fs2au = 1.0 / 2.4188843265857e-2; // time
    const double Unit_Angstrom2au = 1.0e-10 / Bohr; // length
    const double Unit_au2Angstrom = 1.0 / Unit_Angstrom2au; // length
    const double Unit_au2J = 4.359744650e-18; // energy
    const double Unit_J2au = 1.0 / Unit_au2J; // energy
    const double Unit_kJpermol2au = 1.0e3 * Unit_J2au / Avogadro; // energy
    const double Unit_au2kJpermol = 1.0 / Unit_kJpermol2au; // energy
    const double Unit_gpermol2au = 1.0e-3 / (Avogadro * 9.10938356e-31); // mass
    const double Unit_au2bar = 2.9421015697e8; // pressure

    //@ref https://www.nist.gov/system/files/documents/2019/12/10/nist_periodictable_july2019.pdf
    const std::map<std::string, double> AtomMassMap = {
        std::map<std::string, double>::value_type("H", 1.008),
        std::map<std::string, double>::value_type("He", 4.0026),
        std::map<std::string, double>::value_type("Li", 6.94),
        std::map<std::string, double>::value_type("Be", 9.0122),
        std::map<std::string, double>::value_type("B", 10.81),
        std::map<std::string, double>::value_type("C", 12.011),
        std::map<std::string, double>::value_type("N", 14.007),
        std::map<std::string, double>::value_type("O", 15.999),
        std::map<std::string, double>::value_type("F", 18.998),
        std::map<std::string, double>::value_type("Ne", 20.180),
        std::map<std::string, double>::value_type("Na", 22.990),
        std::map<std::string, double>::value_type("Mg", 24.305),
        std::map<std::string, double>::value_type("Al", 26.982),
        std::map<std::string, double>::value_type("Si", 28.085),
        std::map<std::string, double>::value_type("P", 30.974),
        std::map<std::string, double>::value_type("S", 32.06),
        std::map<std::string, double>::value_type("Cl", 35.45),
        std::map<std::string, double>::value_type("Ar", 39.948),
        std::map<std::string, double>::value_type("K", 39.098),
        std::map<std::string, double>::value_type("Ca", 40.078),
        std::map<std::string, double>::value_type("Sc", 44.956),
        std::map<std::string, double>::value_type("Ti", 47.867),
        std::map<std::string, double>::value_type("V", 50.942),
        std::map<std::string, double>::value_type("Cr", 51.996),
        std::map<std::string, double>::value_type("Mn", 54.938),
        std::map<std::string, double>::value_type("Fe", 55.845),
        std::map<std::string, double>::value_type("Co", 58.933),
        std::map<std::string, double>::value_type("Ni", 58.693),
        std::map<std::string, double>::value_type("Cu", 63.546),
        std::map<std::string, double>::value_type("Zn", 65.38),
        std::map<std::string, double>::value_type("Ga", 69.723),
        std::map<std::string, double>::value_type("Ge", 72.630),
        std::map<std::string, double>::value_type("As", 74.922),
        std::map<std::string, double>::value_type("Se", 78.971),
        std::map<std::string, double>::value_type("Br", 79.904),
        std::map<std::string, double>::value_type("Kr", 83.798),
        std::map<std::string, double>::value_type("Rb", 85.468),
        std::map<std::string, double>::value_type("Sr", 87.62),
        std::map<std::string, double>::value_type("Y", 88.906),
        std::map<std::string, double>::value_type("Zr", 91.224),
        std::map<std::string, double>::value_type("Nb", 92.906),
        std::map<std::string, double>::value_type("Mo", 95.95),
        std::map<std::string, double>::value_type("Tc", 97),
        std::map<std::string, double>::value_type("Ru", 101.07),
        std::map<std::string, double>::value_type("Rh", 102.91),
        std::map<std::string, double>::value_type("Pd", 106.42),
        std::map<std::string, double>::value_type("Ag", 107.87),
        std::map<std::string, double>::value_type("Cd", 112.41),
        std::map<std::string, double>::value_type("In", 114.82),
        std::map<std::string, double>::value_type("Sn", 118.71),
        std::map<std::string, double>::value_type("Sb", 121.76)
        // @TODO add all elements
    };
};
#endif